package com.xl.activiti.demo.controller;

import cn.hutool.json.JSONObject;
import cn.hutool.json.JSONUtil;
import lombok.extern.slf4j.Slf4j;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.servlet.http.HttpServletRequest;
import java.util.Map;

/**
 * @author zhongwm
 */
@Slf4j
@RestController
public class TestContrller {

    @GetMapping("/hello")
    public JSONObject hello(HttpServletRequest request) {
        log.info("Hello Activiti.");

        Map<String, String[]> parameterMap = request.getParameterMap();
        log.info("parameterMap:{}", JSONUtil.toJsonStr(parameterMap));

        return new JSONObject().set("name", "Tom");
    }
}
